import org.junit.Before;
import org.junit.Test;

import play.db.jpa.GenericModel.JPAQuery;
import play.test.Fixtures;
import play.test.UnitTest;
import net.sf.oval.constraint.Assert;
import models.Organization;

public class secret extends UnitTest {

	@Before
	public void delete() {
		Fixtures.deleteAll();
	}

	@Test
	public void test() {
		// Create a new public organization
		new Organization("Intel", "lalala", 0).save();
		// Create a new secret organization
		new Organization("HP", "hahaha", 2).save();
		// Retrieving them
		Organization i = Organization.find("byName", "Intel").first();
		Organization h = Organization.find("byName", "HP").first();
		// testing
		assertEquals(false, i.isSecret());
		assertEquals(true, h.isSecret());

	}
}
